<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
<title>信保通</title>
<!-- HTML5 Shim and Respond.js IE9 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script type="text/javascript" th:src="${urls.getForLookupPath('https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js')}"></script>
<script type="text/javascript" th:src="${urls.getForLookupPath('https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js')}"></script>
      <![endif]-->
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<meta name="description" content="Phoenixcoded">
<meta name="keywords"
	content=", Flat ui, Admin , Responsive, Landing, Bootstrap, App, Template, Mobile, iOS, Android, apple, creative app">
<meta name="author" content="Phoenixcoded">
<!-- Favicon icon -->
<link rel="icon" th:href="${urls.getForLookupPath('/assets/images/favicon.ico')}" type="image/x-icon">
<!-- Google font-->
<!-- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet">-->
<!-- Required Fremwork -->
<link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/bower_components/bootstrap/css/bootstrap.min.css')}">
<!-- themify icon -->
<link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/icon/themify-icons/themify-icons.css')}">
<!-- ico font -->
<link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/icon/icofont/css/icofont.css')}">
<!-- flag icon framework css -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/pages/flag-icon/flag-icon.min.css')}"> -->
<!-- Menu-Search css -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/pages/menu-search/css/component.css')}"> -->
<!-- Horizontal-Timeline css -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/pages/dashboard/horizontal-timeline/css/style.css')}"> -->
<!-- amchart css -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/pages/dashboard/amchart/css/amchart.css')}"> -->
<!-- flag icon framework css -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/pages/flag-icon/flag-icon.min.css')}"> -->
<!-- Style.css -->
<link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/css/style.css')}">
<!--color css-->
<!-- Date-time picker css -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/pages/advance-elements/css/bootstrap-datetimepicker.css')}"> -->
<!-- Date-range picker css  -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/bower_components/bootstrap-daterangepicker/css/daterangepicker.css')}" /> -->
<!-- Date-Dropper css -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/bower_components/datedropper/css/datedropper.min.css')}" /> -->
<!-- Data Table Css -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/pages/data-table/css/dataTables.bootstrap.css')}"> -->
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/pages/data-table/css/buttons.dataTables.min.css')}"> -->
<!-- <link rel="stylesheet" type="text/css" href="../../bower_components/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css"> -->

<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/css/linearicons.css')}"> -->
<link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/css/simple-line-icons.css')}">
<!-- <link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/css/ionicons.css')}">
<link rel="stylesheet" type="text/css" th:href="${urls.getForLookupPath('/assets/css/jquery.mCustomScrollbar.css')}"> -->
<!-- pages -->
<link rel="stylesheet" th:href="${urls.getForLookupPath('/assets/css/element.css')}">
<link rel="stylesheet" th:href="${urls.getForLookupPath('/assets/css/common.css')}">
<style>
.uploadFiles  { border:none!important; height:45px;}
</style>
</head>

<body>
	<!-- Pre-loader start -->
	<div class="theme-loader">
	</div>
	<!-- Pre-loader end -->
	<!-- Menu header start -->
	<div id="pcoded" class="pcoded">
		<div class="pcoded-overlay-box"></div>
		<div class="pcoded-container navbar-wrapper">
            <div id="topBar"></div>
			<div class="pcoded-main-container">
				<div class="pcoded-wrapper">
				    <!-- nav -->
				    <div id="sidebarNavbar"></div>
					<div class="pcoded-content">
						<div class="pcoded-inner-content">
              <!-- main start -->
							<div class="main-body" id="mainBody">
								<div class="page-wrapper">
									<!-- Page-header start -->
									<div class="page-header">
										<div class="page-header-title">
											<h4>数据上报管理</h4>
											<span>数据上报管理......</span>
										</div>
										<div class="page-header-breadcrumb">
											<ul class="breadcrumb-title">
												<li class="breadcrumb-item"><a href="../index.html"> <i
														class="icofont icofont-home"></i>
												</a></li>
												<li class="breadcrumb-item"><a href="#!">数据收集</a></li>
												<li class="breadcrumb-item"><a href="#!">数据上报管理</a></li>
											</ul>
										</div>
									</div>
									<!-- Page-header end -->
									<!-- Page-body start -->
									<div class="page-body">
										<div class="row">
											<div class="col-lg-12">
												<div class="card table-1-card">
													<div class="card-block">
														<div class="card-header">
															<h5>数据查询</h5>
															
															<div class="button">
																<button class="btn btn-success btn-round" @click="showDownloadData">
																	<i class="icofont icofont-download-alt"></i>模板下载
																</button>
															
																<button class="btn btn-round btn-success" @click="showUploadData">
																	<i class="icofont icofont-ui-add"></i>数据上传
																</button>
															</div>
														</div>
														<div class="card-body">
															<div class="uploadData-search">
																<el-form :inline="true" :model="searchForm" ref="searchForm" class="demo-form-inline" style="float:left; width:80%;">
																	<el-form-item label="数据类型" style="width:58%" prop="select">
																		<el-select multiple filterable v-model="searchForm.select" placeholder="请选择数据类型" style="width:100%;">
																			<el-option v-for="dataType in dataTypes" :label="dataType.codename" :value="dataType.id"></el-option>
																		</el-select>
																	</el-form-item>
																	<el-form-item label="查询月份" prop="month">
																		<el-date-picker
																			v-model="searchForm.month"
																			type="month"
																			placeholder="选择月" ></el-date-picker>
																	</el-form-item>
																</el-form>
																<div class="uploadData-searchBtns">
																	<button type="button" class="btn btn-round btn-success" @click="findDataReportByPage(1)">
																		<i class="icofont icofont-ui-search"></i>查询
																	</button>
																	<button type="button" class="btn btn-round btn-warning" @click="resetSearchForm('searchForm')">
																		<i class="icofont icofont icofont-ui-delete"></i>清空
																	</button>
																</div>
															</div>
															<div class="table-responsive">
																<table class="table table-striped table-bordered" id="table">
																	<thead>
																	<tr>
																		<th>#</th>
																		<th>数据类型</th>
																		<th>部门</th>
																		<th>上传人</th>
																		<th>上传时间</th>
																		<th>操作</th>
																	</tr>
																	</thead>
																	<tbody>
																	<tr v-for="(dataItem,index) in dataList">
																		<th scope="row">{{index + 1}}</th>
																		<td class="tabledit-view-mode"><span
																				class="tabledit-span">{{dataItem.code_NAME}}</span></td>
																		<td>{{dataItem.tosname}}</td>
																		<td>{{dataItem.tucname}}</td>
																		<td>{{dataItem.create_TIME}}</td>
																		<td class="tabledit-view-mode">
																		<button type="button" class="tabledit-edit-button btn btn-primary waves-effect waves-light" style="float: none; margin: 5px;" @click="downloadFile(dataItem.id)">
																			下载
																		</button>
																			<!-- <button type="button"
																					class="tabledit-edit-button btn btn-info waves-effect waves-light"
																					style="float: none; margin: 5px;">
																				查看
																			</button> -->
																		</td>
																	</tr>
																	</tbody>
																</table>
															</div>
															<div class="block">
																<!-- <span class="demonstration">页数较少时的效果</span> -->
																<el-pagination background layout="prev, pager, next,total" :current-page.sync="currentpage"  @current-change="handleCurrentChange" :total="pageBean.totalNumber"></el-pagination>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>

									</div>
								</div>
								<!--数据上传-->
								<el-dialog
									title="数据上传"
									:visible.sync="dialogVisible"
									:close-on-click-modal="false"
									width="50%" @close="closeDialog('ruleForm')">
									<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
										<el-form-item label="数据类型" prop="region">
											<el-select class="w100" v-model="ruleForm.region" placeholder="请选择数据类型">
												<el-option v-for="dataType in allowDataTypes" :label="dataType.codename" :value="dataType.id"></el-option>
											</el-select>
										</el-form-item>
										<el-form-item label="所属月份" prop="selectMonth">
													<el-date-picker type="month" placeholder="选择月" v-model="ruleForm.selectMonth" style="width: 100%;"></el-date-picker>
										</el-form-item>
										
										<el-form-item  label="上传文件" required>
											<input type="file" id="file"  accept=".xls,.xlsx,.docx,.doc" class="uploadFiles" ></input>
										</el-form-item>
										
										<el-form-item label="备注" prop="remarks" >
											<el-input type="textarea" v-model="ruleForm.remarks"></el-input>
										</el-form-item>
									</el-form>
									<span slot="footer" class="dialog-footer">
										<el-button type="primary" @click="saveForm('ruleForm')">保存</el-button>
									</span>
								</el-dialog>
								
								<!--数据类型模板下载-->
								<el-dialog
									title="模板下载"
									:visible.sync="templatDialogVisible"
									:close-on-click-modal="false"
									width="50%" @close="closeTemplateDialog('templateRuleForm')">
									<el-form :model="templateRuleForm" :rules=tempalteRules ref="templateRuleForm" label-width="100px" class="demo-ruleForm">
										<el-form-item label="数据类型" prop="datatype">
											<el-select class="w100" v-model="templateRuleForm.datatype" placeholder="请选择数据类型" @change="selectDataType('templateRuleForm')">
												<el-option v-for="dataType in downloadDataTypes" :label="dataType.codename" :value="dataType.id"></el-option>
											</el-select>
										</el-form-item>
										
										<el-form-item label="模板名">
											<el-input type="input" v-model="templateRuleForm.templateName" disabled="disabled" ></el-input>
										</el-form-item>
									</el-form>
									<span slot="footer" class="dialog-footer">
										<el-button type="primary" @click="downloadTemplet('templateRuleForm')">下载</el-button>
									</span>
								</el-dialog>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- Older IE warning message -->
	<!-- Warning Section Ends -->
	<!-- Required Jqurey -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/jquery/js/jquery.min.js')}"></script>
	<!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/jquery-ui/js/jquery-ui.min.js')}"></script> -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/popper.js/js/popper.min.js')}"></script>
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/bootstrap/js/bootstrap.min.js')}"></script>
	<!-- jquery slimscroll js -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/jquery-slimscroll/js/jquery.slimscroll.js')}"></script>
	<!-- modernizr js -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/modernizr/js/modernizr.js')}"></script>
	<!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/modernizr/js/css-scrollbars.js')}"></script> -->
	<!-- classie js -->
	<!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/classie/js/classie.js')}"></script> -->


	<!-- i18next.min.js -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/i18next/js/i18next.min.js')}"></script>
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/i18next-xhr-backend/js/i18nextXHRBackend.min.js')}"></script>
	<!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/i18next-browser-languagedetector/js/i18nextBrowserLanguageDetector.min.js')}"></script> -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/jquery-i18next/js/jquery-i18next.min.js')}"></script>



	<!-- Bootstrap date-time-picker js -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/assets/pages/advance-elements/moment-with-locales.min.js')}"></script>
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}"></script>
	<script type="text/javascript" th:src="${urls.getForLookupPath('/assets/pages/advance-elements/bootstrap-datetimepicker.min.js')}"></script>
	<!-- Date-range picker js -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/bootstrap-daterangepicker/js/daterangepicker.js')}"></script>
	<!-- Date-dropper js -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/datedropper/js/datedropper.min.js')}"></script>
	<!-- Custom js -->
	<!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/assets/pages/advance-elements/custom-picker.js')}"></script> -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/script.js')}"></script>
	<!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/pcoded.min.js')}"></script> -->
	<!-- pcmenu js -->
	<script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/pcoded.min.js')}"></script>
	<script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/demo-12.js')}"></script>
	<script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/jquery.mCustomScrollbar.concat.min.js')}"></script>
	<!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/jquery.mousewheel.min.js')}"></script> -->
    <!-- datatables -->
    <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/datatable/jquery.dataTables.min.js')}"></script>
    <!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/datatable/dataTables.buttons.min.js')}"></script> -->
    <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/datatable/jszip.min.js')}"></script>
    <!-- <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/datatable/pdfmake.min.js')}"></script>
    <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/datatable/vfs_fonts.js')}"></script>
    <script type="text/javascript" th:src="${urls.getForLookupPath('/bower_components/datatable/buttons.html5.min.js')}"></script> -->
    <!-- vue -->
    <script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/vue/vue.min.js')}"></script>
    <script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/vue/element.js')}"></script>
    <!-- pages -->
    <script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/pages/common.js')}"></script>
    <script type="text/javascript" th:src="${urls.getForLookupPath('/assets/js/pages/datareport/datareport.js')}"></script>
</body>

</html>

